home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 58 / 058side4.d64 / edstar (seq) (.txt) < prev    next >
Commodore BASIC  |  2022-08-29  |  7KB  |  275 lines

  1. 0 remed2
  2. 5 poke650,255:print"";:goto30
  3. 10 xx=0:ifxy<760thenreturn
  4. 15 print"[207]ut of lines!!!":fort=1to500:next:print"[145]                 "
  5. 20 xx=-1
  6. 25 return
  7. 30 poke53280,6:poke53281,0:print"[147]"
  8. 35 ifpeek(49408)<>1thenprint"[158]loading":load"edstar 4.o",8,1
  9. 40 gosub50:poke55,0:poke56,39:clr:s=10000:poke53272,23:goto60
  10. 45 rem *rst scr wd*
  11. 50 poke1020,1:poke1021,19:poke1022,0:poke1023,39:return
  12. 55 rem *sys #s*
  13. 60 iprc=49448:lsav=49430
  14. 65 mttp=49433:mbot=49436
  15. 70 sdwn=49415:scup=49412
  16. 75 sfil=49418:lfil=49421
  17. 80 lmov=49442:mwip=49439
  18. 85 dchr=49424:ichr=49427
  19. 90 wwrp=49445:clsm=49409
  20. 95 mdel=49451:mins=49454
  21. 100 wchk=49457:prnt=49460
  22. 105 splt=49463:cata=49466
  23. 110 g1lu=49469:g2lu=49472
  24. 115 g3lu=49475:g4li=49478
  25. 120 g5lu=49481:rdel=49484
  26. 125 sys mwip
  27. 130 gosub765
  28. 135 deffns(x)=x*40+9960
  29. 140 poke646,12:sys clsm:gosub300:gosub405:ln=1:goto145
  30. 145 ps=1465:poke53272,23:t$="x":gosub715:goto155
  31. 150 rem*
  32. 155 getc$:ifc$<>"" then175
  33. 160 pokeps,peek(ps)or128
  34. 165 getc$:ifc$<>"" then175
  35. 170 gosub303:goto155
  36. 175 poke150,asc(c$):sysiprc:if peek(150)=0then270
  37. 180 onpeek(151)goto190,205,210,215,220,225,230,235,240,245,250,255,260,265
  38. 185 goto165
  39. 190 xy=ln:gosub10:ifxxthen200:rem cr
  40. 195 gosub303:ps=1465:syslsav,ln:ln=ln+1:sys scup:sys mbot,ln+8
  41. 200 goto280
  42. 205 gosub395:goto165:ins char
  43. 210 gosub330:goto165:crs lt
  44. 215 gosub345:goto165:crs rt
  45. 220 gosub355:goto165:crs up
  46. 225 gosub380:goto165:crs dn
  47. 230 gosub475:goto165:^d line del
  48. 235 gosub530:goto165:^i line ins
  49. 240 gosub303:gosub635:gosub410:gosub725:gosub985:goto165:save
  50. 245 gosub805:gosub720:goto165:^p printer
  51. 250 gosub310:goto165:del char
  52. 255 gosub1315:goto165:^x exit
  53. 260 gosub910:goto165:^h help
  54. 265 gosub1025:goto165:^f functions
  55. 270 lp=peek(49151+asc(c$))
  56. 275 pokeps,lp:ps=ps+1:ifps=1503then ps=1465:gosub430:syslsav,ln:sys mbot,ln+8
  57. 280 ifln>nlthennl=ln
  58. 285 goto155
  59. 290 :
  60. 295 rem*rstr clr ln*
  61. 300 fort=55736to55775:poket,7:nextt:return
  62. 303 pokeps,peek(ps)and127:return
  63. 305 rem*dl ch*
  64. 310 if ps<1466 then return
  65. 315 poke150,ps-1465:gosub303:sys dchr
  66. 320 ps=ps-1:return
  67. 325 rem*cr lf*
  68. 330 if ps>1465thengosub303:pokeps,peek(ps)or128:gosub303:ps=ps-1
  69. 335 return
  70. 340 rem*cr rt*
  71. 345 if ps<1502thengosub303:pokeps,peek(ps)or128:gosub303:ps=ps+1
  72. 350 return
  73. 355 rem*cr up*
  74. 360 ifln=1thenprint"             [211]tart of text[152]":gosub585:return
  75. 365 gosub303:syslsav,ln:ln=ln-1:syssdwn
  76. 370 if ln>10then sysmttp,ln-10
  77. 375 return
  78. 380 rem*crsr dn*
  79. 385 ifln>=nlthengosub575:return
  80. 390 gosub303:syslsav,ln:ln=ln+1:sys scup:sys mbot,ln+8:return
  81. 395 rem*ins cpokear*
  82. 400 pokeps,peek(ps)and127:poke150,ps-1463:sys ichr:return
  83. 405 rem*clr menu*
  84. 410 print"[155] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  85. 415 gosub303
  86. 420 fort=1to3:print" [221]                                    [221]":nextt
  87. 425 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][145][145][145][145]";:return
  88. 430 rem*wrap*
  89. 435 xy=ln:gosub10:ifxxthenreturn
  90. 440 xf=0:ifpeek(1502)=32thenxf=-1
  91. 445 sm=fns(ln+1):poke251,int(sm/256):poke250,sm-peek(251)*256
  92. 450 fm=fns(nl):poke253,int(fm/256):poke252,fm-peek(253)*256
  93. 455 syswchk:ifpeek(150)<>0thenpoke1020,12:syssdwn:sysmins:nl=nl+1:poke1020,1
  94. 460 sys wwrp:ps=peek(150)+1464:syslsav,ln:sys scup:ln=ln+1
  95. 465 ifxf=-1thenps=1465
  96. 470 return
  97. 475 rem*line del*
  98. 480 if nl=0 then return
  99. 485 print"[196]eleting a line..."
  100. 490 sm=fns(ln):poke251,int(sm/256):poke250,sm-peek(251)*256
  101. 495 sm=fns(nl+1):poke253,int(sm/256):poke252,sm-peek(253)*256:sys mdel
  102. 500 poke1020,11:sys scup:gosub50:ps=1465:nl=nl-1
  103. 505 syslsav,ln:sys mbot,ln+8
  104. 510 print"                   ":poke150,0:poke151,0
  105. 515 poke152,0:poke153,o
  106. 520 if nl<ln then gosub355
  107. 525 return
  108. 530 rem*line ins*
  109. 535 xy=nl:gosub10:ifxxthenreturn
  110. 540 print"[201]nserting a line..."
  111. 545 sm=fns(ln):poke251,int(sm/256):poke250,sm-peek(251)*256
  112. 550 fm=fns(nl):poke253,int(fm/256):poke252,fm-peek(253)*256:sys mins
  113. 555 :nl=nl+1
  114. 560 gosub303:poke1020,11:syssdwn:gosub50:ps=1465
  115. 565 print"                    ":poke150,0:poke151,0:poke152,0
  116. 570 poke153,0:return
  117. 575 rembzz
  118. 580 print"[197]nd of text"
  119. 585 fort=1to40:nextt:goto605
  120. 590 poke54296,15:poke54277,45:poke54278,165
  121. 595 poke54276,33:poke54273,6:poke54272,5
  122. 600 fort=1to200:next:poke54276,32:poke54273,0:poke54272,0:poke198,0:return
  123. 605 print"                            ":return
  124. 610 :
  125. 615 rem*exit*
  126. 620 gosub410:print"[193]re you sure you want to exit?(y/n)"
  127. 625 getd$:ifd$="" then625
  128. 630 ifd$<>"y"then ow=0:return
  129. 635 syslsav,ln:fx=17:open15,8,15,"i0":close15
  130. 640 gosub410:print"save as what? "fi$"":print"[145][145]";:input"";fs$
  131. 645 iffs$=""orfs$=chr$(221)thenprint"[147]":syscata:print"":goto640
  132. 650 fx=fx-1:fs$=left$(fs$,fx):ifright$(fs$,1)=" "then645:iffs$=fi$then655
  133. 655 fi$=fs$:gosub410:print"saving '"fi$"'":open15,8,15
  134. 660 print#15,"r0:"fi$"=0:"fi$
  135. 665 ow=-1:input#15,a$:if a$<>"63"then690
  136. 670 print"[145]file exists! replace?(y/n)";:gosub590
  137. 675 get r$:ifr$="" then675
  138. 680 if r$<>"y"then close15:return
  139. 685 print" [156][207].[203].[152]":print#15,"s0:"+fi$:close15
  140. 690 fi$=fi$+",s,w"
  141. 695 poke827,len(fi$):forc=1tolen(fi$):poke827+c,asc(mid$(fi$,c)):next
  142. 700 fi$=fs$
  143. 705 poke251,(nl)/256:poke250,256*((nl)/256-peek(251)):sys sfil
  144. 710 sv=-1:return
  145. 715 rem*menu*
  146. 720 gosub303:syslsav,ln:gosub410
  147. 725 print"<ctrl>[159][201][152][146]nsert line   <ctrl>[159][211][152][146]ave text"
  148. 730 print"<ctrl>[159][196][152][146]elete line   <ctrl>[159][208][152][146]rinter"
  149. 735 print"<ctrl>[159][200][152][146]elp          <ctrl>e[159][216][152][146]it"
  150. 740 if t$="x"then return
  151. 745 get me$:ifme$="" then745
  152. 750 if me$="d"orme$="i"orme$="p"orme$="h"orme$="s"orme$="x"then return
  153. 755 goto745
  154. 760 rem*load*
  155. 765 print"[147][204]oad:":gosub1260
  156. 770 sysmwip
  157. 775 poke250,17:poke251,39:poke252,nl/256:poke253,256*((nl/256)-peek(252))
  158. 780 sys lfil:t$="x":gosub1295:ifnl<>0then795
  159. 785 :
  160. 790 open15,8,15:input#15,s$:close15:return
  161. 795 gosub300:return
  162. 800 rem*print*
  163. 805 syslsav,ln:gosub410
  164. 810 print"       ===== [208][210][201][206][212][197][210][152] ====="
  165. 815 print"[210]eady printer and hit space bar."
  166. 820 print"[216] to cancel.                    "
  167. 825 getp$:ifp$="" then825
  168. 830 ifp$<>" "then print"[145][207].[203]., don't print.":fort=1to699::nextt:return
  169. 835 open4,4:cmd4:printchr$(17);
  170. 840 lc=0:lp=1
  171. 845 ifnl-lp<120then865
  172. 850 fori=lptolp+59:rs=60:gosub885:next
  173. 855 ifpeek(203)=23then875
  174. 860 print:print:print:print:print:print:lp=lp+120:goto845
  175. 865 rs%=(nl-lp+2)/2:rs=rs%:fori=lptolp+rs-1:gosub885
  176. 870 next
  177. 875 print"";:getk$:close4:return
  178. 880 :
  179. 885 m1=fns(i):m2=fns(i+rs)
  180. 890 poke151,m1/256:poke150,256*(m1/256-peek(151)):sysprnt
  181. 895 poke151,m2/256:poke150,256*(m2/256-peek(151)):sysprnt
  182. 900 return
  183. 905 :
  184. 910 rem*help*
  185. 915 gosub303:syslsav,ln:print"[147]"
  186. 920 print"[158][197][196][211][212][193][210]"
  187. 925 print" [212]o access functions press ^f."
  188. 930 print" [212]he next key does the job."
  189. 935 print" f1 = top of text, f7 = bottom"
  190. 940 print" f3 = up 10 lines, f5 = down.
  191. 945 [153]" ^s splits lines,  ^g glues."
  192. 950 [153]" ^w wipes leading spaces."
  193. 955 [153]" ^a appends a file."
  194. 960 [153]" ^z zaps between \ flags."
  195. 962 [153]" ^d double spaces lines."
  196. 965 [153]"                                      "
  197. 970 [153]" (NULL)ow press the (NULL) key to exit help.   "
  198. 975 [161] t$:[139] t$ [178] "" [167]975
  199. 980 [139] t$[179][177]"x" [167]975
  200. 985 [153]"load":[151]646,12:[158] clsm
  201. 990 [141]410:[141]725:[141]300
  202. 995 [129]p[178]ln[171]10[164]ln[170]7
  203. 1000 [139] p[179]1[167]1010
  204. 1005 [158] mbot,p:[158] scup
  205. 1010 [130]p:[158] mbot,p
  206. 1015 [141]300:[142]
  207. 1020 functs
  208. 1025 [141]303:[153]"ascunct:";:[158]lsav,ln
  209. 1030 [161]f$:[139]f$[178]""[167]1030
  210. 1035 [153]"      ";
  211. 1040 [139]f$[178]""[167][141]1100:[142]:glue
  212. 1045 [139]f$[178]""[167][141]1160:[142]:split
  213. 1050 [139]f$[178]"let"[167][141]1180:[142]:[128] of text
  214. 1055 [139]f$[178]"input"[167][141]1185:[142]:[164]p of text
  215. 1060 [13